import request from "@/utils/request";

// 获取用户精简列表
export function listReduceUser(query) {
  return request({
    url: "/system/user/simple/list",
    method: "get",
    params: query,
  });
}

// 查询诊断任务列列表
export function listTask(query) {
  return request({
    url: "/system/diagnosistask/list",
    method: "get",
    params: query,
  });
}

// 查询诊断任务列详细
export function getTask(query) {
  return request({
    url: "/system/diagnosistask/selectbyids",
    method: "get",
    params: query,
  });
}

// 查询诊断任务列详细
export function getUndoCompany() {
  return request({
    url: "/system/diagnosistask/getundocompanys",
    method: "get",
  });
}

// 新增诊断任务列
export function addTask(data) {
  return request({
    url: "/system/diagnosistask",
    method: "post",
    data: data,
  });
}

// 修改诊断任务列
export function updateTask(data) {
  return request({
    url: "/system/diagnosistask",
    method: "put",
    data: data,
  });
}

// 删除诊断任务列
export function delTask(companyId) {
  return request({
    url: "/system/diagnosistask/" + companyId,
    method: "delete",
  });
}

// 企业测评表结束评分 /dev-api/system/company/test/end/{deptId}
export function endTask(deptId) {
  return request({
    url: "/system/company/test/end/" + deptId,
    method: "put",
  });
}
// 现场诊断结束评分
export function endDiagnosisTask(deptId) {
  return request({
    url: "/system/diagnosis/end/" + deptId,
    method: "put",
  });
}
